package news.paper.tintuc.tinnong.docbao.doctin.model;

import android.annotation.SuppressLint;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;

public class NewsDetail {
	private int ContentID,SourceID,ZoneID,HasImage,PortraitAvatarWidth,PortraitAvatarHeight,LandscapeAvatarWidth,LandscapeAvatarHeight,ListId;
	private String SourceName,ZoneName,Title,Description,Body,PortraitAvatar,LandscapeAvatar,Images,ContentUrl,BaomoiUrl,ModifiedDate,IsPrepared,
	ListName,ListType,Date;
	public int getContentID() {
		return ContentID;
	}
	public void setContentID(int contentID) {
		ContentID = contentID;
	}
	public int getSourceID() {
		return SourceID;
	}
	public void setSourceID(int sourceID) {
		SourceID = sourceID;
	}
	public int getZoneID() {
		return ZoneID;
	}
	public void setZoneID(int zoneID) {
		ZoneID = zoneID;
	}
	public int getHasImage() {
		return HasImage;
	}
	public void setHasImage(int hasImage) {
		HasImage = hasImage;
	}
	public int getPortraitAvatarWidth() {
		return PortraitAvatarWidth;
	}
	public void setPortraitAvatarWidth(int portraitAvatarWidth) {
		PortraitAvatarWidth = portraitAvatarWidth;
	}
	public int getPortraitAvatarHeight() {
		return PortraitAvatarHeight;
	}
	public void setPortraitAvatarHeight(int portraitAvatarHeight) {
		PortraitAvatarHeight = portraitAvatarHeight;
	}
	public int getLandscapeAvatarWidth() {
		return LandscapeAvatarWidth;
	}
	public void setLandscapeAvatarWidth(int landscapeAvatarWidth) {
		LandscapeAvatarWidth = landscapeAvatarWidth;
	}
	public int getLandscapeAvatarHeight() {
		return LandscapeAvatarHeight;
	}
	public void setLandscapeAvatarHeight(int landscapeAvatarHeight) {
		LandscapeAvatarHeight = landscapeAvatarHeight;
	}
	public int getListId() {
		return ListId;
	}
	public void setListId(int listId) {
		ListId = listId;
	}
	public String getSourceName() {
		return SourceName;
	}
	public void setSourceName(String sourceName) {
		SourceName = sourceName;
	}
	public String getZoneName() {
		return ZoneName;
	}
	public void setZoneName(String zoneName) {
		ZoneName = zoneName;
	}
	public String getTitle() {
		return Title;
	}
	public void setTitle(String title) {
		Title = title;
	}
	public String getDescription() {
		return Description;
	}
	public void setDescription(String description) {
		Description = description;
	}
	public String getBody() {
		return Body;
	}
	public void setBody(String body) {
		Body = body;
	}
	public String getPortraitAvatar() {
		return PortraitAvatar;
	}
	public void setPortraitAvatar(String portraitAvatar) {
		PortraitAvatar = portraitAvatar;
	}
	public String getLandscapeAvatar() {
		return LandscapeAvatar;
	}
	public void setLandscapeAvatar(String landscapeAvatar) {
		LandscapeAvatar = landscapeAvatar;
	}
	public String getImages() {
		return Images;
	}
	public void setImages(String images) {
		Images = images;
	}
	public String getContentUrl() {
		return ContentUrl;
	}
	public void setContentUrl(String contentUrl) {
		ContentUrl = contentUrl;
	}
	public String getBaomoiUrl() {
		return BaomoiUrl;
	}
	public void setBaomoiUrl(String baomoiUrl) {
		BaomoiUrl = baomoiUrl;
	}
	public String getModifiedDate() {
		return ModifiedDate;
	}
	public void setModifiedDate(String modifiedDate) {
		ModifiedDate = modifiedDate;
	}
	public String getIsPrepared() {
		return IsPrepared;
	}
	public void setIsPrepared(String isPrepared) {
		IsPrepared = isPrepared;
	}
	public String getListName() {
		return ListName;
	}
	public void setListName(String listName) {
		ListName = listName;
	}
	public String getListType() {
		return ListType;
	}
	public void setListType(String listType) {
		ListType = listType;
	}
	@SuppressLint("SimpleDateFormat")
	public String getDate() {
		String date_string = "";
		long minus = 0 ;
		try {
			long date_long = Long.parseLong(Date);
			long date_sub = (System.currentTimeMillis() - date_long) / 1000;
			minus = date_sub / 60;
			if (minus <= 60) {
				date_string = minus + " phút trước";
			} else if (minus > 60 && minus <= 24 * 60) {
				date_string = minus / 60 + " giờ trước";
			} else {
				DateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
				Date netDate = (new Date(Long.parseLong(date_long + "")));
				date_string = sdf.format(netDate);
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
		return date_string;
	}
	public void setDate(String date) {
		Date = date;
	}
	public NewsDetail() {
		super();
		// TODO Auto-generated constructor stub
	}
	
}
